Remove guarantees we do not intend to hold
authorBenjamin Otte <otte.benjamin@googlemail.com>
Sun, 10 Jan 2021 21:37:03 +0000 (21:37 +0000)
committerBenjamin Otte <otte.benjamin@googlemail.com>
Sun, 10 Jan 2021 21:37:03 +0000 (21:37 +0000)
The fact that we are using gdk-pixbuf for loading files currrently does not mean we will use it going forward.
Also, "anything gdk-pixbuf can load" does not mean anything, because what gdk-pixbuf can load is a compile-time option.

As new_from_resource() will assert() if it cannot load a resource, we must be very sure that people do not use anything but PNG and JPEG for resources and the docs were not clear on that.

gdk/gdktexture.c

index d54bb73e16dabf53f47f6651a210951c3926a03b..f69cc47f06300fb2bd7a79e9c608ffd8cb8de023 100644 (file)
@@ -316,9 +316,9 @@ gdk_texture_new_for_pixbuf (GdkPixbuf *pixbuf)
  * @resource_path: the path of the resource file
  *
  * Creates a new texture by loading an image from a resource.
- * The file format is detected automatically, and can be any
- * format that is supported by the gdk-pixbuf library, such as
- * JPEG or PNG.
+ * The file format is detected automatically.
+ * The supported formats are PNG and JPEG, though more formats might be
+ * available.
  *
  * It is a fatal error if @resource_path does not specify a valid
  * image resource and the program will abort if that happens.
@@ -352,9 +352,9 @@ gdk_texture_new_from_resource (const char *resource_path)
  * @error: Return location for an error
  *
  * Creates a new texture by loading an image from a file.
- * The file format is detected automatically, and can be any
- * format that is supported by the gdk-pixbuf library, such as
- * JPEG or PNG.
+ * The file format is detected automatically.
+ * The supported formats are PNG and JPEG, though more formats might be
+ * available.
  *
  * If %NULL is returned, then @error will be set.
  *